﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EWebsite.Admin.Product" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <span class="page-title">Products</span><br />
    <asp:GridView ID="grvProducts" runat="server" AutoGenerateColumns="False" 
        EnableModelValidation="True" Width="100%" AllowPaging="True" 
        onpageindexchanging="grvProducts_PageIndexChanging" 
        onrowdeleting="grvProducts_RowDeleting">
        <Columns>
            <asp:TemplateField HeaderText="ProductID" Visible="False">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ProductID") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblID" runat="server" Text='<%# Bind("ProductID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:ImageField DataImageUrlField="ProductPhotoURL" HeaderText="Image">
                <ControlStyle CssClass="img-edit" />
            </asp:ImageField>
            <asp:TemplateField HeaderText="Info">
                <ItemTemplate>                    
                    <asp:HyperLink ID="HyperLink5" runat="server"
                        NavigateUrl='<%# Eval("ProductID", "/Admin/Products/Edit.aspx?p={0}") %>' Text='<%# Bind("ProductName") %>'></asp:HyperLink>                    
                    <br />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField HeaderText="Delete" ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <br />
    
</asp:Content>
